public class Test1 {
    //方法重载
    static void methodOne(int a){
        System.out.println("这是方法重载int");
    };
    static void methodOne(byte b){
        System.out.println("这是方法重载byte");
    }
    //方法递归
    static int methodTwo(int c){
        if (c == 1){
            return 1;
        } else {
            return c+methodTwo(c);
        }
    };
    //引用传递
    public static void main(String[] args){
        int d=1;
        Person p=new Person();
        p.age=20;
        methodThree(d,p);
        System.out.println(d);
        System.out.println(p.age);
    }

    static void methodThree(int d,Person p){
        d++;
        p.age++;
    };

    static class Person{
        private int age;
        public int getAge() {
            return age;
        }
        public void setAge(int age) {
            this.age = age;
        }
    }

}
